home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3x / curs_inopts.z / curs_inopts
Encoding:
Text File  |  2002-10-03  |  17.3 KB  |  191 lines

  1.  
  2.  
  3.  
  4. ccccuuuurrrrssss____iiiinnnnooooppppttttssss((((3333XXXX))))                                                ccccuuuurrrrssss____iiiinnnnooooppppttttssss((((3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_uuuu_rrrr_ssss______iiii_nnnn_oooo_pppp_tttt_ssss:  _cccc_bbbb_rrrr_eeee_aaaa_kkkk, _nnnn_oooo_cccc_bbbb_rrrr_eeee_aaaa_kkkk, _eeee_cccc_hhhh_oooo, _nnnn_oooo_eeee_cccc_hhhh_oooo, _hhhh_aaaa_llll_ffff_dddd_eeee_llll_aaaa_yyyy, _iiii_nnnn_tttt_rrrr_ffff_llll_uuuu_ssss_hhhh,
  10.      _kkkk_eeee_yyyy_pppp_aaaa_dddd, _mmmm_eeee_tttt_aaaa, _nnnn_oooo_dddd_eeee_llll_aaaa_yyyy, _nnnn_oooo_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt, _rrrr_aaaa_wwww, _nnnn_oooo_rrrr_aaaa_wwww, _nnnn_oooo_qqqq_iiii_ffff_llll_uuuu_ssss_hhhh, _qqqq_iiii_ffff_llll_uuuu_ssss_hhhh,
  11.      _tttt_iiii_mmmm_eeee_oooo_uuuu_tttt, _wwww_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt, _tttt_yyyy_pppp_eeee_aaaa_hhhh_eeee_aaaa_dddd - _cccc_uuuu_rrrr_ssss_eeee_ssss terminal input option control
  12.      routines
  13.  
  14. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>>
  16.  
  17.      _iiii_nnnn_tttt _cccc_bbbb_rrrr_eeee_aaaa_kkkk_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  18.      _iiii_nnnn_tttt _nnnn_oooo_cccc_bbbb_rrrr_eeee_aaaa_kkkk_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  19.      _iiii_nnnn_tttt _eeee_cccc_hhhh_oooo_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  20.      _iiii_nnnn_tttt _nnnn_oooo_eeee_cccc_hhhh_oooo_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  21.      _iiii_nnnn_tttt _hhhh_aaaa_llll_ffff_dddd_eeee_llll_aaaa_yyyy_((((_iiii_nnnn_tttt _tttt_eeee_nnnn_tttt_hhhh_ssss_))))_;;;;
  22.      _iiii_nnnn_tttt _iiii_nnnn_tttt_rrrr_ffff_llll_uuuu_ssss_hhhh_((((_WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_wwww_iiii_nnnn_,,,, _bbbb_oooo_oooo_llll _bbbb_ffff_))))_;;;;
  23.      _iiii_nnnn_tttt _kkkk_eeee_yyyy_pppp_aaaa_dddd_((((_WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_wwww_iiii_nnnn_,,,, _bbbb_oooo_oooo_llll _bbbb_ffff_))))_;;;;
  24.      _iiii_nnnn_tttt _mmmm_eeee_tttt_aaaa_((((_WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_wwww_iiii_nnnn_,,,, _bbbb_oooo_oooo_llll _bbbb_ffff_))))_;;;;
  25.      _iiii_nnnn_tttt _nnnn_oooo_dddd_eeee_llll_aaaa_yyyy_((((_WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_wwww_iiii_nnnn_,,,, _bbbb_oooo_oooo_llll _bbbb_ffff_))))_;;;;
  26.      _iiii_nnnn_tttt _nnnn_oooo_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt_((((_WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_wwww_iiii_nnnn_,,,, _bbbb_oooo_oooo_llll _bbbb_ffff_))))_;;;;
  27.      _iiii_nnnn_tttt _rrrr_aaaa_wwww_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  28.      _iiii_nnnn_tttt _nnnn_oooo_rrrr_aaaa_wwww_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  29.      _vvvv_oooo_iiii_dddd _nnnn_oooo_qqqq_iiii_ffff_llll_uuuu_ssss_hhhh_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  30.      _vvvv_oooo_iiii_dddd _qqqq_iiii_ffff_llll_uuuu_ssss_hhhh_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  31.      _vvvv_oooo_iiii_dddd _tttt_iiii_mmmm_eeee_oooo_uuuu_tttt_((((_iiii_nnnn_tttt _dddd_eeee_llll_aaaa_yyyy_))))_;;;;
  32.      _vvvv_oooo_iiii_dddd _wwww_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt_((((_WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_wwww_iiii_nnnn_,,,, _iiii_nnnn_tttt _dddd_eeee_llll_aaaa_yyyy_))))_;;;;
  33.      _iiii_nnnn_tttt _tttt_yyyy_pppp_eeee_aaaa_hhhh_eeee_aaaa_dddd_((((_iiii_nnnn_tttt _ffff_dddd_))))_;;;;
  34.  
  35. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  36.      The _cccc_bbbb_rrrr_eeee_aaaa_kkkk and _nnnn_oooo_cccc_bbbb_rrrr_eeee_aaaa_kkkk routines put the terminal into and out of _cccc_bbbb_rrrr_eeee_aaaa_kkkk
  37.      mode, respectively.  In this mode, characters typed by the user are
  38.      immediately available to the program, and erase/kill character-processing
  39.      is not performed.  When out of this mode, the tty driver buffers the
  40.      typed characters until a newline or carriage return is typed.  Interrupt
  41.      and flow control characters are unaffected by this mode.  Initially the
  42.      terminal may or may not be in _cccc_bbbb_rrrr_eeee_aaaa_kkkk mode, as the mode is inherited;
  43.      therefore, a program should call _cccc_bbbb_rrrr_eeee_aaaa_kkkk or _nnnn_oooo_cccc_bbbb_rrrr_eeee_aaaa_kkkk explicitly.  Most
  44.      interactive programs using _cccc_uuuu_rrrr_ssss_eeee_ssss set the _cccc_bbbb_rrrr_eeee_aaaa_kkkk mode.
  45.  
  46.      Note that _cccc_bbbb_rrrr_eeee_aaaa_kkkk overrides _rrrr_aaaa_wwww.  [See curs_getch(3X) for a discussion of
  47.      how these routines interact with _eeee_cccc_hhhh_oooo and _nnnn_oooo_eeee_cccc_hhhh_oooo.]
  48.  
  49.      The _eeee_cccc_hhhh_oooo and _nnnn_oooo_eeee_cccc_hhhh_oooo routines control whether characters typed by the user
  50.      are echoed by _gggg_eeee_tttt_cccc_hhhh as they are typed.  Echoing by the tty driver is
  51.      always disabled, but initially _gggg_eeee_tttt_cccc_hhhh is in echo mode, so characters typed
  52.  
  53.  
  54.  
  55.                                                                         PPPPaaaaggggeeee 1111
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. ccccuuuurrrrssss____iiiinnnnooooppppttttssss((((3333XXXX))))                                                ccccuuuurrrrssss____iiiinnnnooooppppttttssss((((3333XXXX))))
  63.  
  64.  
  65.  
  66.      are echoed.  Authors of most interactive programs prefer to do their own
  67.      echoing in a controlled area of the screen, or not to echo at all, so
  68.      they disable echoing by calling _nnnn_oooo_eeee_cccc_hhhh_oooo.  [See curs_getch(3X) for a
  69.      discussion of how these routines interact with _cccc_bbbb_rrrr_eeee_aaaa_kkkk and _nnnn_oooo_cccc_bbbb_rrrr_eeee_aaaa_kkkk.]
  70.  
  71.      The _hhhh_aaaa_llll_ffff_dddd_eeee_llll_aaaa_yyyy routine is used for half-delay mode, which is similar to
  72.      _cccc_bbbb_rrrr_eeee_aaaa_kkkk mode in that characters typed by the user are immediately
  73.      available to the program.  However, after blocking for _t_e_n_t_h_s tenths of
  74.      seconds, ERR is returned if nothing has been typed.  The value of _tttt_eeee_nnnn_tttt_hhhh_ssss
  75.      must be a number between 1 and 255.  Use _nnnn_oooo_cccc_bbbb_rrrr_eeee_aaaa_kkkk to leave half-delay
  76.      mode.
  77.  
  78.      If the _iiii_nnnn_tttt_rrrr_ffff_llll_uuuu_ssss_hhhh option is enabled, (_b_f is _TTTT_RRRR_UUUU_EEEE), when an interrupt key
  79.      is pressed on the keyboard (interrupt, break, quit) all output in the tty
  80.      driver queue will be flushed, giving the effect of faster response to the
  81.      interrupt, but causing _cccc_uuuu_rrrr_ssss_eeee_ssss to have the wrong idea of what is on the
  82.      screen.  Disabling (_b_f is _FFFF_AAAA_LLLL_SSSS_EEEE), the option prevents the flush.  The
  83.      default for the option is inherited from the tty driver settings.  The
  84.      window argument is ignored.
  85.  
  86.      The _kkkk_eeee_yyyy_pppp_aaaa_dddd option enables the keypad of the user's terminal.  If enabled
  87.      (_b_f is _TTTT_RRRR_UUUU_EEEE), the user can press a function key (such as an arrow key)
  88.      and _wwww_gggg_eeee_tttt_cccc_hhhh returns a single value representing the function key, as in
  89.      _KKKK_EEEE_YYYY______LLLL_EEEE_FFFF_TTTT.  If disabled (_b_f is _FFFF_AAAA_LLLL_SSSS_EEEE), _cccc_uuuu_rrrr_ssss_eeee_ssss does not treat function keys
  90.      specially and the program has to interpret the escape sequences itself.
  91.      If the keypad in the terminal can be turned on (made to transmit) and off
  92.      (made to work locally), turning on this option causes the terminal keypad
  93.      to be turned on when _wwww_gggg_eeee_tttt_cccc_hhhh is called.  The default value for keypad is
  94.      false.
  95.  
  96.      Initially, whether the terminal returns 7 or 8 significant bits on input
  97.      depends on the control mode of the tty driver [see termio(7)].  To force
  98.      8 bits to be returned, invoke _mmmm_eeee_tttt_aaaa(_w_i_n, _TTTT_RRRR_UUUU_EEEE).  To force 7 bits to be
  99.      returned, invoke _mmmm_eeee_tttt_aaaa(_w_i_n, _FFFF_AAAA_LLLL_SSSS_EEEE).  The window argument, _w_i_n, is always
  100.      ignored.  If the terminfo capabilities _ssss_mmmm_mmmm (meta_on) and _rrrr_mmmm_mmmm (meta_off)
  101.      are  defined for the terminal, _ssss_mmmm_mmmm is sent to the terminal when _mmmm_eeee_tttt_aaaa(_w_i_n,
  102.      _TTTT_RRRR_UUUU_EEEE) is called and _rrrr_mmmm_mmmm is sent when _mmmm_eeee_tttt_aaaa(_w_i_n, _FFFF_AAAA_LLLL_SSSS_EEEE) is called.
  103.  
  104.      The _nnnn_oooo_dddd_eeee_llll_aaaa_yyyy option causes _gggg_eeee_tttt_cccc_hhhh to be a non-blocking call.  If no input
  105.      is ready, _gggg_eeee_tttt_cccc_hhhh returns _EEEE_RRRR_RRRR.  If disabled (_b_f is _FFFF_AAAA_LLLL_SSSS_EEEE), _gggg_eeee_tttt_cccc_hhhh waits
  106.      until a key is pressed.
  107.  
  108.      While interpreting an input escape sequence, _wwww_gggg_eeee_tttt_cccc_hhhh sets a timer while
  109.      waiting for the next character.  If _nnnn_oooo_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt_((((_w_i_n, _TTTT_RRRR_UUUU_EEEE) is called, then
  110.      _wwww_gggg_eeee_tttt_cccc_hhhh does not set a timer.  The purpose of the timeout is to
  111.      differentiate between sequences received from a function key and those
  112.      typed by a user.
  113.  
  114.      With the _rrrr_aaaa_wwww and _nnnn_oooo_rrrr_aaaa_wwww routines, the terminal is placed into or out of
  115.      raw mode.  Raw mode is similar to _cccc_bbbb_rrrr_eeee_aaaa_kkkk mode, in that characters typed
  116.      are immediately passed through to the user program.  The differences are
  117.      that in raw mode, the interrupt, quit, suspend, and flow control
  118.  
  119.  
  120.  
  121.                                                                         PPPPaaaaggggeeee 2222
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. ccccuuuurrrrssss____iiiinnnnooooppppttttssss((((3333XXXX))))                                                ccccuuuurrrrssss____iiiinnnnooooppppttttssss((((3333XXXX))))
  129.  
  130.  
  131.  
  132.      characters are all passed through uninterpreted, instead of generating a
  133.      signal.  The behavior of the BREAK key depends on other bits in the tty
  134.      driver that are not set by _cccc_uuuu_rrrr_ssss_eeee_ssss.
  135.  
  136.      When the _nnnn_oooo_qqqq_iiii_ffff_llll_uuuu_ssss_hhhh routine is used, normal flush of input and output
  137.      queues associated with the _IIII_NNNN_TTTT_RRRR, _QQQQ_UUUU_IIII_TTTT and _SSSS_UUUU_SSSS_PPPP characters will not be
  138.      done [see termio(7)].  When _qqqq_iiii_ffff_llll_uuuu_ssss_hhhh is called, the queues will be flushed
  139.      when these control characters are read.
  140.  
  141.      The _tttt_iiii_mmmm_eeee_oooo_uuuu_tttt and _wwww_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt routines set blocking or non-blocking read for a
  142.      given window.  If _d_e_l_a_y is negative, blocking read is used (_i._e., waits
  143.      indefinitely for input).  If _d_e_l_a_y is zero, then non-blocking read is
  144.      used (_i._e., read returns _EEEE_RRRR_RRRR if no input is waiting).  If _d_e_l_a_y is
  145.      positive, then read blocks for _d_e_l_a_y milliseconds, and returns _EEEE_RRRR_RRRR if
  146.      there is still no input.  Hence, these routines provide the same
  147.      functionality as _nnnn_oooo_dddd_eeee_llll_aaaa_yyyy, plus the additional capability of being able to
  148.      block for only _d_e_l_a_y milliseconds (where _d_e_l_a_y is positive).
  149.  
  150.      _cccc_uuuu_rrrr_ssss_eeee_ssss does ``line-breakout optimization'' by looking for typeahead
  151.      periodically while updating the screen.  If input is found, and it is
  152.      coming from a tty, the current update is postponed until _rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh or
  153.      _dddd_oooo_uuuu_pppp_dddd_aaaa_tttt_eeee is called again.  This allows faster response to commands typed
  154.      in advance.  Normally, the input FILE pointer passed to _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm, or _ssss_tttt_dddd_iiii_nnnn
  155.      in the case that _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr was used, will be used to do this typeahead
  156.      checking.  The _tttt_yyyy_pppp_eeee_aaaa_hhhh_eeee_aaaa_dddd routine specifies that the file descriptor _f_d is
  157.      to be used to check for typeahead instead.  If _f_d is -1, then no
  158.      typeahead checking is done.
  159.  
  160. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  161.      All routines that return an integer return _EEEE_RRRR_RRRR upon failure and an
  162.      integer value other than _EEEE_RRRR_RRRR upon successful completion, unless otherwise
  163.      noted in the preceding routine descriptions.
  164.  
  165. NNNNOOOOTTTTEEEESSSS
  166.      The header file _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>> automatically includes the header files
  167.      _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>> and _<<<<_uuuu_nnnn_cccc_tttt_rrrr_llll_...._hhhh_>>>>.
  168.  
  169.      Note that _eeee_cccc_hhhh_oooo, _nnnn_oooo_eeee_cccc_hhhh_oooo, _hhhh_aaaa_llll_ffff_dddd_eeee_llll_aaaa_yyyy, _iiii_nnnn_tttt_rrrr_ffff_llll_uuuu_ssss_hhhh, _mmmm_eeee_tttt_aaaa, _nnnn_oooo_dddd_eeee_llll_aaaa_yyyy, _nnnn_oooo_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt,
  170.      _nnnn_oooo_qqqq_iiii_ffff_llll_uuuu_ssss_hhhh, _qqqq_iiii_ffff_llll_uuuu_ssss_hhhh, _tttt_iiii_mmmm_eeee_oooo_uuuu_tttt, and _wwww_tttt_iiii_mmmm_eeee_oooo_uuuu_tttt may be macros.
  171.  
  172. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  173.      _cccc_uuuu_rrrr_ssss_eeee_ssss(3X), _cccc_uuuu_rrrr_ssss______gggg_eeee_tttt_cccc_hhhh(3X), _cccc_uuuu_rrrr_ssss______iiii_nnnn_iiii_tttt_ssss_cccc_rrrr(3X), _tttt_eeee_rrrr_mmmm_iiii_oooo(7)
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.                                                                         PPPPaaaaggggeeee 3333
  188.  
  189.  
  190.  
  191.